<cd-modal [modalRef]="activeModal">
  <ng-container i18n="form title|Example: Create Pool@@formTitle"
                class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container>

  <ng-container class="modal-content">
    <form #formDir="ngForm"
          [formGroup]="osdPgScrubForm"
          novalidate
          cdFormScope="osd">
      <div class="modal-body osd-modal">
        <!-- Basic -->
        <cd-config-option [optionNames]="basicOptions"
                          [optionsForm]="osdPgScrubForm"
                          [optionsFormDir]="formDir"
                          [optionsFormGroupName]="'basicFormGroup'"
                          #basicOptionsValues></cd-config-option>
        <!-- Advanced -->
        <div class="row">
          <div class="col-sm-12">
            <a class="pull-right margin-right-md"
               (click)="advancedEnabled = true"
               *ngIf="!advancedEnabled"
               i18n>Advanced...</a>
          </div>
        </div>
        <div *ngIf="advancedEnabled">
          <h3 class="page-header"
              i18n>Advanced configuration options</h3>
          <cd-config-option [optionNames]="advancedOptions"
                            [optionsForm]="osdPgScrubForm"
                            [optionsFormDir]="formDir"
                            [optionsFormGroupName]="'advancedFormGroup'"
                            #advancedOptionsValues></cd-config-option>
        </div>
      </div>
      <div class="modal-footer">
        <cd-form-button-panel (submitActionEvent)="submitAction()"
                              [form]="osdPgScrubForm"
                              [showSubmit]="permissions.configOpt.update"
                              [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)">
        </cd-form-button-panel>
      </div>
    </form>
  </ng-container>
</cd-modal>
